class MyProperty:
    def __init__(self, fget=None, fset=None, fdel=None):
        self.fget = fget
        self.fset = fset
        self.fdel = fdel

    def __get__(self, instance, owner):
        return self.fget(instance)

    def __set__(self, instance, value):
        self.fset(instance, value)

    def __delete__(self, instance):
        self.fdel(instance)


class C:
    def __init__(self):
        self._x = "666"
        self.y = "666"

    def get_x(self):
        return self._x

    def set_x(self, value):
        self._x = value

    def del_x(self):
        del self._x

    x = MyProperty(get_x, set_x, del_x)


if __name__ == "__main__":
    c = C()
    c.x = "X-man"
    print(c.x)
    print(c._x)
    print(c.y)
    del c.x
    print(c._x)
